package com.controladores.controlvehicular;

import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Typeface;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class Zona extends Activity {
	protected TextView fuenteZona;

	@Override
	protected void onCreate(Bundle savedInstanceState) {		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_zona);
		fuenteZona = (TextView)findViewById(R.id.tZona);
		Typeface tipofuenteZona = Typeface.createFromAsset(getAssets(),"inkedgod.ttf");
		fuenteZona.setTypeface(tipofuenteZona);
		/*Button botonCC = (Button)findViewById(R.id.btnCambiarC);
		botonCC.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				//Intent aDatos = new Intent(Zona.this,Datos.class);
				//startActivity(aDatos);
				Intent aMultas = new Intent(Zona.this,Multas.class);
				startActivity(aMultas);
			}
			
		});*/
		Button boton1= (Button)findViewById(R.id.bEpacio1);
		boton1.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				AlertDialog selecRegistro = new AlertDialog.Builder(Zona.this).create();
				selecRegistro.setTitle("Opciones");
				selecRegistro.setMessage("Escoja una de las opciones");
				selecRegistro.setButton("Registro Veh�culo", new DialogInterface.OnClickListener() {
					
					@Override
					public void onClick(DialogInterface arg0, int arg1) {
						// TODO Auto-generated method stub
						Intent aRegistroVehiculo = new Intent(Zona.this,InformacionVehiculo.class);
						startActivity(aRegistroVehiculo);
					}
					
				});
				/*selecRegistro.setButton2("Registro Recarga", new DialogInterface.OnClickListener() {
					
					@Override
					public void onClick(DialogInterface arg0, int arg1) {
						// TODO Auto-generated method stub
						Intent aRegistroRecarga = new Intent(Zona.this,Activity_registro_recargas.class);
						startActivity(aRegistroRecarga);
					}
				} );*/
				selecRegistro.setButton3("Generar Multa", new DialogInterface.OnClickListener() {
					
					@Override
					public void onClick(DialogInterface arg0, int arg1) {
						// TODO Auto-generated method stub
						Intent aMulta = new Intent(Zona.this,Multas.class);
						startActivity(aMulta);
					}
				} );
				selecRegistro.show();
				// TODO Auto-generated method stub
				
			}
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_zona, menu);
		return true;
		
	}
	
	@Override
	public boolean onOptionsItemSelected(MenuItem item){
		switch(item.getItemId()){
		case R.id.iCambiarClave:
			Intent aDatos = new Intent(Zona.this, Datos.class);
			startActivity(aDatos);
			break;
			
		case R.id.menu_settings:
			Intent aAyuda = new Intent(Zona.this, Datos.class);
			startActivity(aAyuda);
			break;
		}
		return super.onOptionsItemSelected(item);
	}
	
	public void metodoRichard(){
		// codigo aqui
	}

}
